﻿@model PageTitleCollection
@{
	int count = 0;
	IEnumerable<PageTitleNode> nodes = null;
	if (Model != null)
	{
		nodes = Model.GetRenderItems();
		count = nodes.Count();
	}
}

@if (count > 1)
{
	<ul class="path">
		@{ int i = 0; }
		@foreach (PageTitleNode n in nodes)
		{
			if (i != count - 1)
			{
				<li>
					@if (String.IsNullOrEmpty(n.Url))
					{
						@n.Text
					}
					else
					{
						<a href="@n.Url">@n.Text</a>
					}
				</li>
			}
			i++;
		}
	</ul>
}